#pragma once

#define IDT_TRACK_MOUSE			999
#include "SkinDef.h"
#include "SkinManager.h"

// CSkinBaseWnd
class CSkinBaseWnd : 
	public CWnd
{
	DECLARE_DYNAMIC(CSkinBaseWnd)

public:
	CSkinBaseWnd();
	virtual ~CSkinBaseWnd();
	CSkinManager m_skin;

protected:
	BOOL m_bUseMemDC;		
	BOOL m_bTrackMouse;
	BOOL m_bMouseOver;	
	BOOL m_bLoad;
	UINT m_iTemplateID;

	virtual BOOL LoadSkin() { return FALSE; }
	static BOOL CALLBACK sUpdateWindowProc(HWND hWnd,LPARAM lParam);
	virtual BOOL PreWM_PAINT(CDC &dc) { UNUSED_ALWAYS(dc); return TRUE; } 
	virtual void PostWM_PAINT(CDC &dc) { UNUSED_ALWAYS(dc); }; 	
	afx_msg void OnDestroy();
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);	
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg BOOL OnQueryNewPalette();
	afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
	afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
	virtual void OnMouseOver();
	virtual void OnMouseLeave();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);

#ifdef _DEBUG
	void For_Only_Debug_Command( MSG* pMsg );
#endif

protected:
	DECLARE_MESSAGE_MAP()
};


